package com.ap.core.validation.message.rules;

/*
 * Gibu.Paul
 * The ApTransactionId must be a valid transactionId on the Zapp system, and also have been completed within the last nine months
 */

import com.ap.core.message.managerefund.info.RequestRetrieveRefundAccountInfo;
import com.ap.core.validation.message.info.MessageValidationInfo;
import com.ap.core.validation.message.info.RefundOriginalInfo;
import com.ap.core.validation.rules.AbstractValidationRule;

/**
 * User: Gibu.Paul 
 * The ApTransactionId must be a valid transactionId on the Zapp system, and also have been completed within the last nine months
 */

public class RV0009RuleForRefund
		extends
		AbstractValidationRule<MessageValidationInfo<RequestRetrieveRefundAccountInfo, RefundOriginalInfo>> {


	@Override
	public boolean validate(
			MessageValidationInfo<RequestRetrieveRefundAccountInfo, RefundOriginalInfo> infoObject) {

		String apTransactionid = infoObject
				.getBoundObject().getRefundRequestInfo().getApTransactionId();
     
		return infoObject.getOriginalInfo().isValidAPTransactionId();
	}



}
